import Vue from "vue";
import VueRouter from "vue-router";
import HomeView from "@/views/index/index.vue";
import market from "@/views/market/index.vue";
import help from "@/views/help/index.vue";
import regard from "@/views/regard/index.vue";
import commission from "@/views/login/commission.vue";
import EditAccount from "@/views/login/EditAccount.vue";
Vue.use(VueRouter);
const routes = [
  {
    path: "/user",
    name: "user",
    component: () => import("../views/user/index.vue"),
    children: [
      {
        path: "login",
        name: "LoginView",
        component: () => import("../views/login/LoginView.vue"),
      },
      {
        path: "register",
        name: "RegisterView",
        component: () => import("../views/login/RegisterView.vue"),
      },
      {
        path: "forget",
        name: "ForgetView",
        component: () => import("../views/login/ForgetView.vue"),
      },
    ],
  },
  /* {
    path: '/dashBoard',
    name: 'dashBoard',
    component: () => import('@/views/DashBoard/index.vue')
  }, */
  {
    path: "/CooperationView",
    name: "CooperationView",
    component: () => import("@/views/CooperationView/index.vue"),
  },
  {
    path: '/SignalView',
    name: 'SignalView',
    component: () => import('@/views/SignalView/index.vue')
  },
  {
    path: "/detail",
    name: "detail",
    component: () => import('@/views/detail/index.vue'),
  },
  {
    path: '/userInfo',
    name: 'userInfo',
    component: () => import('@/views/userInfo/userInfo.vue'),
  },
  {
    path: "/",
    component: HomeView,
  },
  {
    path: "/market",
    name: "market",
    component: market,
  },
  {
    path: "/help",
    name: "help",
    component: help,
  },
  {
    path: "/regard",
    name: "regard",
    component: regard,
  },
  {
    path: "/commission",
    name: "commission",
    component: commission,
  },
  {
    path: '/edit',
    name: 'EditAccount',
    component: () => import('@/views/login/EditAccount.vue'),
  },
  // {
  //   path: '/about',
  //   name: 'about',
  //   component: () => import('../views/AboutView.vue')
  // }
];
const router = new VueRouter({
  mode: "hash",
  base: process.env.BASE_URL,
  routes,
});

export default router;
